(*
  Copyright (c) 2009 Barry Schwartz

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use,
  copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.
*)

open Location
open Pycaml
open UniTools
open UTypes
  
type istream

val create : unit -> istream
val of_list : uc_list -> istream
val to_list : istream -> uc_list
val of_string : uc_string -> istream
val to_string : istream -> uc_string
val of_file : UniText.t -> istream
val assign : istream -> istream -> unit
val exchange : istream -> istream -> unit
val duplicate : istream -> istream
val eof : istream -> bool
val location : istream -> location
val set_location : istream -> location -> bool -> unit
val get_char : istream -> int -> uc_char
val next_char : istream -> uc_char
val take : istream -> int -> uc_list
val remove : istream -> int -> unit
val pop : istream -> uc_char
val clear : istream -> unit
val match_prefix : istream -> uc_list -> bool
val insert_list : istream -> uc_list -> unit
val insert_string : istream -> uc_string -> unit
val insert_stream : istream -> istream -> unit
val include_file : istream -> UniText.t -> unit

val pythonize_istream : istream -> pyobject
val unpythonize_istream : pyobject -> istream
